﻿using Max.PH4.Shoppgin.Admin.Domain;
using Microsoft.EntityFrameworkCore;

namespace Max.PH4.Shoppgin.Admin.DataAccess
{
    public class MyDbContext:DbContext
    {
        /*
         * base是指父类
         * **/
        public MyDbContext(DbContextOptions<MyDbContext> options):base(options){}


        /*
         * virtual表示虚方法
         * 在这里，你不加virtual也可以
         * **/
        public virtual DbSet<SystemUserEntity> SystemUsers { get; set; }
        public virtual DbSet<CategoryEntity> Categories { get; set; }

        #region 20230626 spu\sku
        public virtual DbSet<SPUEntity> SPUs { get; set; }
        public virtual DbSet<SKUEntity> SKUs { get; set; }
        public virtual DbSet<SKUImageEntity> SKUImages { get; set; }
        public virtual DbSet<SPUSpecEntity> SPUSpecs { get; set; }


        #endregion

        #region 20230703 order/logistic

        public virtual DbSet<OrderDetailEntity> OrderDetails { get; set; }
        public virtual DbSet<OrderMasterEntity> OrderMasters { get; set; }
        public virtual DbSet<LogisticDetailEntity> LogisticDetails { get; set; }
        public virtual DbSet<LogisticMasterEntity> LogisticMasters { get; set; }

        #endregion
    }
}